/*
 * @Author: your name
 * @Date: 2020-06-22 10:44:01
 * @LastEditTime: 2020-09-22 10:55:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \antd-vue-pro\src\main.js
 */ 
// with polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import { VueAxios } from './utils/request'

// mock
// WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
import './mock'

import bootstrap from './core/bootstrap'
import './core/lazy_use'
import './permission' // permission control
import './utils/filter' // global filter
import './components/global.less'
import { Dialog } from '@/components'

import './icons'
import IconSvg from '@/components/IconSvg';
Vue.component('icon-svg',IconSvg);
import './echarts'

import KFormDesign from 'k-form-design'
import 'k-form-design/lib/k-form-design.css'
Vue.use(KFormDesign)

import '@/views/pageTest/customForm'

Vue.config.productionTip = false
// Vue.config.performance = true;

// mount axios Vue.$http and this.$http
Vue.use(VueAxios)
Vue.use(Dialog)

window.addEventListener('beforeunload',()=>{
  console.log('beforeunload event !');
  return '您输入的内容尚未保存，确定离开此页面吗？';
  // event.preventDefault();
})

new Vue({
  router,
  store,
  created: bootstrap,
  render: h => h(App)
}).$mount('#app')
